<template>
  <div class="detailCenter">
    <div class="contentItem">
        <div class="contentTitle">
            <p>基本信息</p>
        </div>
        <div class="contentBody">
            <span>入住时间：14:00之后</span>
            <span>离店时间：12:00之前</span>
            <span>{{ hotelData.creation_time }} / {{ hotelData.renovat_time }}</span>
            <span>酒店规模：{{hotelData.roomCount}}间客房</span>
        </div>
    </div>
    <div class="contentItem">
        <div class="contentTitle">
            <p>主要设施</p>
        </div>
        <div class="hotelassets">
            <span
            class="assets"
            v-for="(item,index) in hotelData.hotelassets"
            :key="index">
                {{item.name}}
            </span>
        </div>
    </div>
    <div class="contentItem">
        <div class="contentTitle">
            <p>停车服务</p>
        </div>
        <div class="contentBody">
            <span>{{ hotelData.parking ? hotelData.parking : '-' }}</span>
        </div>
    </div>
    <div class="contentItem">
        <div class="contentTitle">
            <p>品牌信息</p>
        </div>
        <div class="contentBody">
            <span>{{ hotelData.hotelbrand ? hotelData.hotelbrand.name : '-' }}</span>
        </div>
    </div>
  </div>
</template>

<script>
export default {
    props: {
        hotelData: {
            type: Object,
            default: {}
        }
    }
}
</script>

<style scoped lang="less">
    .detailCenter{
        margin-top: 20px;
        .contentItem{
            height: 50px;
            display: flex;
            align-items: center;
            border-bottom: 1px solid #eee;
            .contentTitle{
                flex: 0 0 25%;
                font-size: 16px;
                color: #666;
            }
            .contentBody{
                flex: 1;
                display: flex;
                justify-content: space-between;
                color: #666;
            }
            .hotelassets{
                flex: 1;
                display: flex;
                color: #666;
                .assets{
                    background-color: rgb(238, 238, 238);
                    border-radius: 5px;
                    padding: 3px;
                    font-size: 14px;
                    cursor: pointer;
                    &:nth-child(n+2){
                        margin-left: 15px;
                    }
                }
            }
        }
    }
</style>